Repository navigation
Conversation
FrankChen021
left a comment
Member
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The analyzer now preserves rewritten join-key filters after joins, including direct rewrites inside OR clauses, so null-extended outer-join rows remain subject to the original predicate.
Reviewed 3 of 3 changed files, including the production analyzer and both modified test files, plus relevant join-filter and cursor call paths.
Validation: git diff --check passed; no builds or tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20975.
Description
Keep the original RHS filter after rewriting a join-key predicate for pushdown. The rewritten filter can still match base rows whose LEFT JOIN result is null, so it cannot replace the post-join check. OR filters now preserve that check too. The rewritten base-table filter still gets pushed down.
Added regressions for direct and OR filters, plus the reported stacked join query across the existing join contexts. The analyzer, join cursor and SQL join suites pass: 716 tests passed and 2 skipped.
Release note
Fixed: filters on boolean values computed from a LEFT JOIN no longer include unmatched rows when another LEFT JOIN is stacked on top.
Key changed/added classes in this PR
JoinFilterAnalyzerJoinFilterAnalyzerTestCalciteJoinQueryTestThis PR has: